package com.neuedu.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.neuedu.pojo.Principal;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author han
 * @since 2020-09-21
 */
public interface PrincipalMapper extends BaseMapper<Principal> {
    @Select("SELECT p.*,t.type_name typeName FROM principal p\n" +
            "LEFT JOIN type t ON p.type_id=t.id ${ew.customSqlSegment}")
    IPage<Principal> list(IPage<Principal> page, @Param(Constants.WRAPPER) Wrapper wrapper);

}
